package be.groept.ace.enquete.servlets;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class UserHomeServlet
 */
@WebServlet("/user/*")
public class UserHomeServlet extends UserServlet {
	private static final long serialVersionUID = 1L;

	@Override
	protected int handleGet(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		setViewAttributes(request, response);
		return 200;
	}

	@Override
	protected int handlePost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		return 404;
	}

	private void setViewAttributes(HttpServletRequest request, HttpServletResponse response) {
		setForm(request, false);
		setPage(request, "home");
		setTitle(request, "home");
	}
}
